import React from "react";
import { Button } from "antd";
import ComponentInput from "./ChidCom/ComponentInput";
import BatchUpdate from "./ChidCom/BatchUpdate";
export default class AboutFiv extends React.Component<any, any> {
  constructor(props: any) {
    super(props);
    this.state = {
      list: [],
    };
  }

  handerClick = () => {
    // this.sliceTime(new Array(40000).fill(0), 0);
    console.log(1);
  };

  formData: any = {};
  render() {
    const { list } = this.state;
    console.log(list);
    return (
      <div>
        <div className="box">
          <ComponentInput
            notifyFatherChange={(value: any) => {
              this.formData.inputValue = value;
            }}
          />
          <Button onClick={() => console.log(this.formData)}>打印数据</Button>
        </div>
        {/* 我们首先来一个列表循环 */}
        {new Array(10).fill(0).map((item, index) => {
          console.log("列表循环了");
          return <div key={index}>{item}</div>;
        })}
        <BatchUpdate />
        <button onClick={this.handerClick}>点击</button>
        {list.map((item: number, index: number) => (
          <li className="list" key={index}>
            {item + "" + index} Item
          </li>
        ))}
      </div>
    );
  }
}
